﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Script.Serialization;

namespace RegisterWeb.Manager.RegistrationFeeManager.ashx
{
    /// <summary>
    /// TuJson1 的摘要说明
    /// </summary>
    public class TuJson1 : IHttpHandler
    {
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            List<tu> list = new List<tu>();
            tu t1 = new tu();
            t1.text = "柱形图";
            t1.val = "1";
            list.Add(t1);
            tu t2 = new tu();
            t2.text = "折线图";
            t2.val = "2";
            list.Add(t2);
            tu t3 = new tu();
            t3.text = "饼形图";
            t3.val = "3";
            list.Add(t3);
            JavaScriptSerializer jss = new JavaScriptSerializer();
            string ss = jss.Serialize(list);
            context.Response.Write(ss);
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
        public class tu
        {
            public String val { get; set; }
            public String text { get; set; }

        }
    }
}